package com.itheima.chap03;

public class ExtendDemo {
    public static void main(String[] args) {
        PhysicalProduct physicalProduct = new PhysicalProduct("华为Mate70",7299.00,672.00);
//        Grandpa grandpa = new Grandpa();
        /*physicalProduct.setName("华为Mate70");
        physicalProduct.setPrice(7299.00);
        physicalProduct.setWeight(672.00);*/
        System.out.println( physicalProduct.displayINfo()/*+ ",重量是：" + physicalProduct.getWeight() + "g"*/);
//        grandpa.show();
        /*physicalProduct.show();*/

        DigitalProduct digitalProduct = new DigitalProduct("APPstore 充值卡",99.90,"123456");
         System.out.println(digitalProduct.displayINfo());
    }
}

// 或者我们也可以直接在main方法里面创建对象